How to get the newest (last modified) directory [C#]

Posted by Shaitan00 on Stack Overflow See other posts from Stack Overflow or by Shaitan00
Published on 2010-05-31T04:02:46Z Indexed on 2010/05/31 4:12 UTC
Read the original article Hit count: 162

Filed under:
|

Currently my application uses string[] subdirs = Directory.GetDirectories(path) to get the list of subdirectories, and now I want to extract the path to the latest (last modified) subdirectory in the list.

What is the easiest way to accomplish this? (efficiency is not a major concern - but robustness is)

© Stack Overflow or respective owner

Related posts about c#

Related posts about directories